package com.a21vianet.quincysx.demo.binderpool.stub;

import android.os.IBinder;
import android.os.RemoteException;

import com.a21vianet.quincysx.demo.binderpool.IBinderPool;
import com.a21vianet.quincysx.demo.binderpool.pool.BinderPool;

public class IBinderPoolImpl extends IBinderPool.Stub {

    public IBinder queryBinder(int binderCode) throws RemoteException {
        IBinder binder = null;
        switch (binderCode) {
            case BinderPool.BINDER_SECURITY_CENTER:
                binder = new SecurityCenterImpl();
                break;
            case BinderPool.BINDER_COMPUTE:
                binder = new ComputeImpl();
                break;
            default:
        }
        return binder;
    }
}
